home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2008 April
/
PCWorld_2008-04_cd.bin
/
v cisle
/
updatestar
/
UpdateStar_Web_ENU.msi
/
NewsXsl
< prev
next >
Wrap
Extensible Markup Language
|
2007-12-10
|
9KB
|
328 lines
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="servernews/stylepath"></xsl:template>
<xsl:template match="servernews/language"></xsl:template>
<xsl:template match="servernews/largefont"></xsl:template>
<xsl:variable name="language"><xsl:value-of select="servernews/language"/></xsl:variable>
<xsl:variable name="stylepathorig"><xsl:value-of select="servernews/stylepath"/></xsl:variable>
<xsl:variable name="largefont"><xsl:value-of select="servernews/largefont"/></xsl:variable>
<xsl:variable name="stylepath"><xsl:copy-of select="$stylepathorig"/>\img\</xsl:variable>
<xsl:template match="servernews/newslist">
<html><head>
<xsl:element name="link">
<xsl:attribute name="href"><xsl:copy-of select="$stylepathorig"/>/style.css</xsl:attribute>
<xsl:attribute name="rel">stylesheet</xsl:attribute>
<xsl:attribute name="type">text/css</xsl:attribute>
</xsl:element>
<xsl:if test="$largefont='yes'">
<style type="text/css">
td {
font-size: 15px;
}
td.desc{
font-size:13px;
}
td.normal{
font-size:13px;
}
td.normalbig{
font-size:13px;
}
a.sublink{
font-size:11px;
font-weight:bold;
}
</style>
</xsl:if>
<!--
<xsl:element name="SCRIPT">
<xsl:attribute name="language">JavaScript</xsl:attribute>
<xsl:attribute name="SRC"><xsl:copy-of select="$stylepathorig"/>\<xsl:copy-of select="$language"/>.js</xsl:attribute>
</xsl:element>
<xsl:element name="SCRIPT">
<xsl:attribute name="language">JavaScript</xsl:attribute>
<xsl:attribute name="SRC"><xsl:copy-of select="$stylepathorig"/>\slang.js</xsl:attribute>
</xsl:element>
-->
<xsl:element name="SCRIPT">
<xsl:attribute name="language">JavaScript</xsl:attribute>
function translate(){
for (newalt in sfields) {
if(document.getElementById(newalt) ){
if(document.getElementById(newalt).alt){//image
document.getElementById(newalt).alt=sfields[newalt];
}else if(document.getElementById(newalt).value == ""){//input
document.getElementById(newalt).value=sfields[newalt];
}else{
document.getElementById(newalt).innerHTML=sfields[newalt];//default div element
}
}
if(document.getElementById(newalt + "_" + 0)){
document.getElementById(newalt + "_" + 0).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 1)){
document.getElementById(newalt + "_" + 1).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 2)){
document.getElementById(newalt + "_" + 2).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 3)){
document.getElementById(newalt + "_" + 3).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 4)){
document.getElementById(newalt + "_" + 4).innerHTML=sfields[newalt];
}
if(document.getElementById(newalt + "_" + 5)){
document.getElementById(newalt + "_" + 5).innerHTML=sfields[newalt];
}
}
}
var sfields = new Array();
//start
sfields["str_noupdate"] = "No Updates Available";
sfields["str_yesupdate"] = "Updates Available!";
sfields["str_lastscan"] = "Last Update Scan:";
sfields["str_foundprogs"] = "Programs found:";
sfields["str_foundupdates"] = "Updates found:";
sfields["searchbutton"] = "Search for Updates";
sfields["listbutton"] = "Program List";
sfields["str_availupdates"] = "Updates Available:";
sfields["str_availvers"] = "Version:";
sfields["str_availnews"] = "News:";
//details
sfields["str_pname"] = "Product name:";
sfields["str_publisher"] = "Publisher:";
sfields["str_category"] = "Category:";
sfields["str_license"] = "License:";
sfields["str_irequirements"] = "System Requirements";
sfields["str_iversion"] = "Installed Version:";
sfields["str_uversion"] = "Current Version:";
sfields["str_management"] = "Administration:";
sfields["str_info"] = "Info:";
sfields["str_sdesc"] = "Short description:";
sfields["str_desc"] = "Description:";
sfields["str_download"] = "Download";
sfields["str_buynow"] = "Buy now";
sfields["str_buyfrom"] = "from ";
sfields["str_errlink"] = "incorrect link";
sfields["str_sendupdate"] = "Send Update";
sfields["sendupdate"] = "Send Update";
sfields["alt_uninstall"] = "Uninstall ";
sfields["alt_repair"] = "Repair";
sfields["alt_modify"] = "Modify";
sfields["str_newstitle"] = "Title";
sfields["str_newsdata"] = "Date";
</xsl:element>
<xsl:if test="$language='1031'">
<script type="text/javascript">
//start
sfields["str_noupdate"] = "Keine Updates verfⁿgbar";
sfields["str_yesupdate"] = "Updates verfⁿgbar!";
sfields["str_lastscan"] = "Letzter Update-Scan:";
sfields["str_foundprogs"] = "Gefundene Programme:";
sfields["str_foundupdates"] = "Gefundene Updates:";
sfields["searchbutton"] = "Updates suchen";
sfields["listbutton"] = "Programmliste";
sfields["str_availupdates"] = "Verfⁿgbare Updates:";
sfields["str_availvers"] = "Aktuelle Version:";
sfields["str_availnews"] = "Verfⁿgbare Meldungen:";
//details
sfields["str_pname"] = "Produktname:";
sfields["str_publisher"] = "Hersteller:";
sfields["str_category"] = "Produktkategorie:";
sfields["str_irequirements"] = "Systemanforderungen:";
sfields["str_license"] = "Lizenz:";
sfields["str_iversion"] = "Installierte Version:";
sfields["str_uversion"] = "Aktuelle Version:";
sfields["str_management"] = "Verwaltung:";
sfields["str_info"] = "Info:";
sfields["str_sdesc"] = "Kurze Beschreibung:";
sfields["str_desc"] = "Beschreibung:";
sfields["str_download"] = "Download";
sfields["str_buynow"] = "Jetzt kaufen";
sfields["str_buyfrom"] = "von ";
sfields["str_errlink"] = "Link ist falsch";
sfields["str_sendupdate"] = "Update senden";
sfields["sendupdate"] = "Update senden";
sfields["alt_uninstall"] = "Deinstallieren ";
sfields["alt_repair"] = "Reparieren";
sfields["alt_modify"] = "─ndern";
//news
sfields["str_newstitle"] = "Titel";
sfields["str_newsdata"] = "Datum";
</script>
</xsl:if>
</head>
<body onload="if(window.translate)translate(); ">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="tl">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>/tbl/shim.gif</xsl:attribute>
<xsl:attribute name="width">2</xsl:attribute>
<xsl:attribute name="height">2</xsl:attribute>
</xsl:element>
</td><td class="tm" width="100%"></td>
<td class="tr">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>/tbl/shim.gif</xsl:attribute>
<xsl:attribute name="width">2</xsl:attribute>
<xsl:attribute name="height">2</xsl:attribute>
</xsl:element>
</td>
</tr>
<tr>
<td class="ml"></td>
<td width="100%" class="wbox">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr><td valign="top" >
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<TR><TD style="white-space: nowrap;padding-left:30px;"><b><div id="str_newsdata">.</div></b></TD>
<TD width="70%" style="white-space: nowrap;"><b><div id="str_newstitle">.</div></b></TD></TR>
<xsl:apply-templates />
</table>
</td></tr>
</table>
</td>
<td class="mr"></td>
</tr>
<tr>
<td class="ml"></td>
<td valign="top" class="wbox">
<xsl:element name="img">
<xsl:attribute name="border">0</xsl:attribute>
<xsl:attribute name="align">right</xsl:attribute>
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>star.gif</xsl:attribute>
</xsl:element>
</td>
<td class="mr"></td>
</tr>
<tr>
<td class="bl">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>/img/tbl/shim.gif</xsl:attribute>
<xsl:attribute name="width">2</xsl:attribute>
<xsl:attribute name="height">2</xsl:attribute>
</xsl:element>
</td>
<td class="bm"></td>
<td class="br">
<xsl:element name="img">
<xsl:attribute name="src"><xsl:copy-of select="$stylepath"/>/img/tbl/shim.gif</xsl:attribute>
<xsl:attribute name="width">2</xsl:attribute>
<xsl:attribute name="height">2</xsl:attribute>
</xsl:element>
</td>
</tr>
</table>
</body></html>
</xsl:template>
<xsl:template match="news">
<TR>
<TD class="normalbig">
<xsl:element name="div">
<xsl:attribute name="class"><xsl:value-of select="type" /></xsl:attribute>
<xsl:value-of select="date" />
</xsl:element>
</TD>
<TD style="white-space: nowrap;" class="normalbig">
<xsl:element name="a">
<xsl:attribute name="href">javascript:window.external.OpenNews(<xsl:value-of select="id" />);</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="url" /></xsl:attribute>
<xsl:value-of select="title" />
</xsl:element>
</TD>
</TR>
</xsl:template>
</xsl:stylesheet>